Refactor.

Darren Cauthon 9 years ago
parent
commit
8ed32e5664
2 changed files with 1 additions and 4 deletions
  1. 0 3
      Gemfile.lock
  2. 1 1
      app/models/agents/webhook_agent.rb

+ 0 - 3
Gemfile.lock

@@ -609,6 +609,3 @@ DEPENDENCIES
609 609
   weibo_2!
610 610
   wunderground (~> 1.2.0)
611 611
   xmpp4r (~> 0.5.6)
612
-
613
-BUNDLED WITH
614
-   1.10.6

+ 1 - 1
app/models/agents/webhook_agent.rb

@@ -46,7 +46,7 @@ module Agents
46 46
       return ["Not Authorized", 401] unless secret == interpolated['secret']
47 47
 
48 48
       #check the verbs
49
-      verbs = (options['verbs'] ? options['verbs'] : 'post').split(/[,;]/).map { |x| x.strip.downcase }
49
+      verbs = (options['verbs'] || 'post').split(/[,;]/).map { |x| x.strip.downcase }
50 50
       return ["Please use #{verbs.join('/').upcase} requests only", 401] unless verbs.include?(method)
51 51
 
52 52
       [payload_for(params)].flatten.each do |payload|